package io.github.mayubao.kotlintest

import android.app.ActivityManager
import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.os.Build
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.annotation.RequiresApi
import android.support.v4.content.ContextCompat
import android.view.View


class MainActivity : AppCompatActivity() {

    @RequiresApi(Build.VERSION_CODES.M)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
//        val context = this
//        val activityManager  = context.getSystemService(ActivityManager::class.java)

        val drawable = ContextCompat.getDrawable(this, R.drawable.ic_launcher_background);
        val path = "R.drawable.ic_laucher";
        val bitmap = path.toBitmap(path);
//        val view : View = View()
//        view.updatePadding()
    }
}
